package com.gs.wzmanager.dao;

import com.gs.wzmanager.dao.mapper.ForecastContrastMapper;
import com.gs.wzmanager.entity.ForecastContrast;
import com.gs.wzmanager.utils.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Legolas
 * Date: 2017/10/17 0017
 */
@Repository
public class ForecastContrastDao {
    @Autowired
    ForecastContrastMapper mapper;

    //默认取前一天数据
    public List<ForecastContrast> queryYesterdayActual(){
        try {
            return mapper.queryYesterdayActual(DateUtil.getYearMonthYesterday().get("year")+"-"+DateUtil.getYearMonthYesterday().get("month")+"-"+DateUtil.getYearMonthYesterday().get("day"));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
